function MyPlane() {
	var self = this
	var num=0
	self.body = document.createElement("div")
	self.init = function() {
		self.body.className = "my-warplain"
		self.body.style.left =ge.width() / 2 - self.width() / 2 + "px"
		self.body.style.bottom = 0
	}
	self.show = function() {
		ge.body.appendChild(self.body)
		self.init()
		self.controller.start()
		self.autoFire()
		return self
	}
	self.width = function() {
		return self.body.offsetWidth
	}
	self.left = function() {
		return self.body.offsetLeft
	}
	self.height=function(){
		return self.body.offsetHeight
	}
	self.top = function() {
		return self.body.offsetTop
	}
	self.controller = {
		start: function() {
			document.addEventListener("mousemove", function(e) {
				if(!GameEngine.pause){
					var _left = e.clientX -ge.left()- self.width() / 2
					var _top=e.clientY-self.height()/2
					self.body.style.left = Math.min(ge.width() - self.width(), Math.max(0, _left)) + "px"
					self.body.style.top=_top+"px"
					ge.notify1(self)
				}
			})
		}
	}
	self.autoFire = function() {
		setInterval(function() {
			if(!GameEngine.pause){
				for(i=0;i<=ge.num(num);i++){
					new Bullet().init().move(i)
				}
			}
		}, ge.difLevel * 200)
	}
	self.destroy=function(success){
		self.timer=setInterval(function(){
			if(!GameEngine.pause){
				var imgurl=self.imgs.shift()
				if(imgurl){
					self.body.style.background="url(images/"+imgurl+")"
				}else{
					clearInterval(self.timer)
					self.body.remove()
					success()
				}
			}
		},250)
	}
	self.imgs=["me_die1.png","me_die2.png","me_die3.png","me_die4.png"]
	self.upgrade=function(){
		num++
		ge.num(num)
	}
}